package day0224;

import java.util.Arrays;

public class Test1 {
    public static void main(String[] args) {

         //int    a;
         //Integer  a;
        int n=Integer.parseInt("2");
        System.out.println(n);
        //int----String(二进制)
        String bStr=Integer.toBinaryString(200);
        System.out.println(bStr);

        String bStr2=Integer.toString(200,2);
        System.out.println(bStr2);

        String cStr=Integer.toHexString(200);
        System.out.println(cStr);

        String cStr2=Integer.toString(200,16);
        System.out.println(cStr2);



        //int      Integer










        /*int[] a={' ',  ' ',   ' ',    '1',   ' ',    ' '  ,' '};
        int[] b={' ',  ' ',   '1',    ' ',  '1',    ' '  ,' '};

        int[] c={' ',  '1',   ' ',   '数',    ' ',   '1'  ,' '};

        int rs= (b[2]-'0')    +   (b[4]-'0');   //"1"  ->  1
        c[3]=(char)(rs+48);//将整数2，转化为字符类型2

        //                       b[2]转为String
        //Integer.parseInt(      b[2]转为String )  :再将String数据转化为int数据
        //                     Integer.parseInt("数据");

        int[] d={'1',  ' ',   '数',   ' ',    '数',   ' ' ,'1'};
        //d[]= 谁 + 谁;
        rs= (c[1]-'0')    +   (c[3]-'0');   //"1"  ->  1
        d[2]=(char)(rs+48);//将整数2，转化为字符类型2

        rs= (c[3]-'0')    +   (c[5]-'0');   //"1"  ->  1
        d[4]=(char)(rs+48);//将整数2，转化为字符类型2



        for (int i = 0; i < a.length; i++) {
            System.out.print((char)a[i]);
        }
        System.out.println();


        for (int i = 0; i < a.length; i++) {
            System.out.print((char)b[i]);
        }
        System.out.println();



        for (int i = 0; i < a.length; i++) {
            System.out.print((char)c[i]);
        }
        System.out.println();

        for (int i = 0; i < a.length; i++) {
            System.out.print((char)d[i]);
        }
        System.out.println();*/

    }
}
